<template>
  <div>
    <!-- 导航栏 -->
    <div class="body">
      <div class="nav">
        <van-nav-bar
          title="AddressEdit 地址编辑"
          right-text
          left-text
          left-arrow
          @click-left="onClickLeft"
          @click-right="onClickRight"
          style="margin-bottom:20px"
        />
      </div>
      <!-- 基础语法 -->
      <div class="basics">
        <span>基础语法</span>
      </div>
      <van-address-edit
        :area-list="areaList"
        show-postal
        show-delete
        show-set-default
        show-search-result
        :search-result="searchResult"
        area-columns-placeholder="['请选择', '请选择', '请选择']"
        @save="onSave"
        @delete="onDelete"
      />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      areaList: "",
      searchResult: []
    };
  },

  methods: {
    onSave() {
      //   Toast('save');
    },
    onDelete() {
      //   Toast('delete');
    },
    // onChangeDetail(val) {
    //   if (val) {
    //     this.searchResult = [
    //       {
    //         name: "黄龙万科中心",
    //         address: "杭州市西湖区"
    //       }
    //     ];
    //   } else {
    //     this.searchResult = [];
    //   }
    // }
  }
};
</script>

<style lang="less" scoped>
.body {
  height: 100vh;
  background: #f8f8f8;
}
.basics {
  height: 50px;
  // background: red;
  line-height: 50px;
  margin-top: -20px;
  margin-left: 20px;
  span{
     color: #AFB7BC;
  }
}

</style>